<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>class Test::Unit::UI::XML::TestRunner - test-unit: Ruby Standard Library Documentation</title>


<script src="../../../../js/navigation.js" defer></script>
<script src="../../../../js/search.js" defer></script>
<script src="../../../../js/search_index.js" defer></script>
<script src="../../../../js/searcher.js" defer></script>
<script src="../../../../js/darkfish.js" defer></script>

<script src="../../../../js/jquery-3.2.0.min.js"></script>

<script src="../../../../js/vue.min.js"></script>
<script src="../../../../js/js.cookie.min.js"></script>

<link href="../../../../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../../../../css/rdoc.css" rel="stylesheet">
<link href="../../../../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../../../../";
  var index_rel_prefix = "../../../../";
  var darkModeCsseHref = "../../../../css/rdoc-dm.css"
  var defaultModeCssHref = "../../../../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="class">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../../../../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../../../../table_of_contents.html#pages">Pages</a>
    <a href="../../../../table_of_contents.html#classes">Classes</a>
    <a href="../../../../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
<div id="parent-class-section" class="nav-section">
  <h3>Parent</h3>

  <p class="link"><a href="../TestRunner.html">Test::Unit::UI::TestRunner</a>
</div>

        
<div id="includes-section" class="nav-section">
  <h3>Included Modules</h3>

  <ul class="link-list">
    <li><span class="include">ERB::Util</span>
  </ul>
</div>

        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li class="calls-super" ><a href="#method-c-new">::new</a>
    <li ><a href="#method-i-add_content">#add_content</a>
    <li ><a href="#method-i-attach_to_mediator">#attach_to_mediator</a>
    <li ><a href="#method-i-close_tag">#close_tag</a>
    <li ><a href="#method-i-finished">#finished</a>
    <li ><a href="#method-i-indent">#indent</a>
    <li ><a href="#method-i-open_tag">#open_tag</a>
    <li ><a href="#method-i-output_started">#output_started</a>
    <li ><a href="#method-i-output_test">#output_test</a>
    <li ><a href="#method-i-output_test_suite">#output_test_suite</a>
    <li ><a href="#method-i-result_fault">#result_fault</a>
    <li ><a href="#method-i-result_pass_assertion">#result_pass_assertion</a>
    <li ><a href="#method-i-started">#started</a>
    <li ><a href="#method-i-test_finished">#test_finished</a>
    <li ><a href="#method-i-test_started">#test_started</a>
    <li ><a href="#method-i-test_suite_finished">#test_suite_finished</a>
    <li ><a href="#method-i-test_suite_started">#test_suite_started</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="class-Test::Unit::UI::XML::TestRunner">
    <h1 id="class-Test::Unit::UI::XML::TestRunner" class="class">
      class Test::Unit::UI::XML::TestRunner
    </h1>

    <section class="description">
    
<p>Runs a <a href="../../TestSuite.html"><code>Test::Unit::TestSuite</code></a> and outputs <a href="../XML.html"><code>XML</code></a>.</p>

    </section>

      <section id="5Buntitled-5D" class="documentation-section">





                <section id="public-class-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Class Methods</h3>
                </header>

                  <div id="method-c-new" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">new</span><span
                                class="method-args">(suite, options={})</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              <p>Creates a new <a href="TestRunner.html"><code>TestRunner</code></a> for running the passed suite. :output option specifies where runner output should go to; defaults to STDOUT.</p>
                                <div class="method-calls-super">
                                  Calls superclass method
                                  <a href="../TestRunner.html#method-c-new"><code>Test::Unit::UI::TestRunner::new</code></a>
                              </div>

                              <div class="method-source-code" id="new-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 25</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">suite</span>, <span class="ruby-identifier">options</span>={})
  <span class="ruby-keyword">super</span>
  <span class="ruby-ivar">@output</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-value">:output</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">STDOUT</span>
  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@options</span>[<span class="ruby-value">:output_file_descriptor</span>]
    <span class="ruby-ivar">@output</span> = <span class="ruby-constant">IO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@options</span>[<span class="ruby-value">:output_file_descriptor</span>], <span class="ruby-string">&quot;w&quot;</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-ivar">@already_outputted</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-ivar">@indent</span> = <span class="ruby-value">0</span>
  <span class="ruby-ivar">@top_level</span> = <span class="ruby-keyword">true</span>
  <span class="ruby-ivar">@current_test</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@current_test_suite</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-ivar">@already_outputted</span> = <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

                <section id="private-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Private Instance Methods</h3>
                </header>

                  <div id="method-i-add_content" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">add_content</span><span
                                class="method-args">(name, content)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="add_content-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 182</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_content</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">content</span>)
  <span class="ruby-keyword">return</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">content</span>.<span class="ruby-identifier">nil?</span>
  <span class="ruby-keyword">case</span> <span class="ruby-identifier">content</span>
  <span class="ruby-keyword">when</span> <span class="ruby-constant">Time</span>
    <span class="ruby-identifier">content</span> = <span class="ruby-identifier">content</span>.<span class="ruby-identifier">iso8601</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-node">&quot;#{indent}&lt;#{name}&gt;#{h(content)}&lt;/#{name}&gt;&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-attach_to_mediator" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">attach_to_mediator</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="attach_to_mediator-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 40</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">attach_to_mediator</span>
  <span class="ruby-ivar">@mediator</span>.<span class="ruby-identifier">add_listener</span>(<span class="ruby-constant">TestResult</span><span class="ruby-operator">::</span><span class="ruby-constant">PASS_ASSERTION</span>,
                         <span class="ruby-operator">&amp;</span><span class="ruby-identifier">method</span>(<span class="ruby-value">:result_pass_assertion</span>))
  <span class="ruby-ivar">@mediator</span>.<span class="ruby-identifier">add_listener</span>(<span class="ruby-constant">TestResult</span><span class="ruby-operator">::</span><span class="ruby-constant">FAULT</span>,
                         <span class="ruby-operator">&amp;</span><span class="ruby-identifier">method</span>(<span class="ruby-value">:result_fault</span>))
  <span class="ruby-ivar">@mediator</span>.<span class="ruby-identifier">add_listener</span>(<span class="ruby-constant">TestRunnerMediator</span><span class="ruby-operator">::</span><span class="ruby-constant">STARTED</span>,
                         <span class="ruby-operator">&amp;</span><span class="ruby-identifier">method</span>(<span class="ruby-value">:started</span>))
  <span class="ruby-ivar">@mediator</span>.<span class="ruby-identifier">add_listener</span>(<span class="ruby-constant">TestRunnerMediator</span><span class="ruby-operator">::</span><span class="ruby-constant">FINISHED</span>,
                         <span class="ruby-operator">&amp;</span><span class="ruby-identifier">method</span>(<span class="ruby-value">:finished</span>))
  <span class="ruby-ivar">@mediator</span>.<span class="ruby-identifier">add_listener</span>(<span class="ruby-constant">TestCase</span><span class="ruby-operator">::</span><span class="ruby-constant">STARTED_OBJECT</span>,
                         <span class="ruby-operator">&amp;</span><span class="ruby-identifier">method</span>(<span class="ruby-value">:test_started</span>))
  <span class="ruby-ivar">@mediator</span>.<span class="ruby-identifier">add_listener</span>(<span class="ruby-constant">TestCase</span><span class="ruby-operator">::</span><span class="ruby-constant">FINISHED_OBJECT</span>,
                         <span class="ruby-operator">&amp;</span><span class="ruby-identifier">method</span>(<span class="ruby-value">:test_finished</span>))
  <span class="ruby-ivar">@mediator</span>.<span class="ruby-identifier">add_listener</span>(<span class="ruby-constant">TestSuite</span><span class="ruby-operator">::</span><span class="ruby-constant">STARTED_OBJECT</span>,
                         <span class="ruby-operator">&amp;</span><span class="ruby-identifier">method</span>(<span class="ruby-value">:test_suite_started</span>))
  <span class="ruby-ivar">@mediator</span>.<span class="ruby-identifier">add_listener</span>(<span class="ruby-constant">TestSuite</span><span class="ruby-operator">::</span><span class="ruby-constant">FINISHED_OBJECT</span>,
                         <span class="ruby-operator">&amp;</span><span class="ruby-identifier">method</span>(<span class="ruby-value">:test_suite_finished</span>))
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-close_tag" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">close_tag</span><span
                                class="method-args">(name)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="close_tag-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 191</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">close_tag</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-ivar">@indent</span> <span class="ruby-operator">-=</span> <span class="ruby-value">2</span>
  <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-node">&quot;#{indent}&lt;/#{name}&gt;&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-finished" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">finished</span><span
                                class="method-args">(elapsed_time)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="finished-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 102</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">finished</span>(<span class="ruby-identifier">elapsed_time</span>)
  <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;success&quot;</span>, <span class="ruby-ivar">@result</span>.<span class="ruby-identifier">passed?</span>)
  <span class="ruby-identifier">close_tag</span>(<span class="ruby-string">&quot;stream&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-indent" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">indent</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="indent-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 169</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">indent</span>
  <span class="ruby-string">&quot; &quot;</span> <span class="ruby-operator">*</span> <span class="ruby-ivar">@indent</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-open_tag" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">open_tag</span><span
                                class="method-args">(name) { || ... }</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="open_tag-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 173</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">open_tag</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-ivar">@output</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-node">&quot;#{indent}&lt;#{name}&gt;&quot;</span>)
  <span class="ruby-ivar">@indent</span> <span class="ruby-operator">+=</span> <span class="ruby-value">2</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">block_given?</span>
    <span class="ruby-keyword">yield</span>
    <span class="ruby-identifier">close_tag</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-output_started" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">output_started</span><span
                                class="method-args">()</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="output_started-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 98</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">output_started</span>
  <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;stream&quot;</span>)
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-output_test" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">output_test</span><span
                                class="method-args">(test)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="output_test-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 196</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">output_test</span>(<span class="ruby-identifier">test</span>)
  <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;test&quot;</span>) <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;name&quot;</span>, <span class="ruby-identifier">test</span>.<span class="ruby-identifier">method_name</span>)
    <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;start-time&quot;</span>, <span class="ruby-identifier">test</span>.<span class="ruby-identifier">start_time</span>)
    <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;elapsed&quot;</span>, <span class="ruby-identifier">test</span>.<span class="ruby-identifier">elapsed_time</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-output_test_suite" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">output_test_suite</span><span
                                class="method-args">(test_suite)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="output_test_suite-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 204</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">output_test_suite</span>(<span class="ruby-identifier">test_suite</span>)
  <span class="ruby-identifier">test_case</span> = <span class="ruby-identifier">test_suite</span>.<span class="ruby-identifier">test_case</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">test_case</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;test-suite&quot;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;name&quot;</span>, <span class="ruby-identifier">test_suite</span>.<span class="ruby-identifier">name</span>)
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;start-time&quot;</span>, <span class="ruby-identifier">test_suite</span>.<span class="ruby-identifier">start_time</span>)
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;elapsed&quot;</span>, <span class="ruby-identifier">test_suite</span>.<span class="ruby-identifier">elapsed_time</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;test-case&quot;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;name&quot;</span>, <span class="ruby-identifier">test_suite</span>.<span class="ruby-identifier">name</span>)
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;start-time&quot;</span>, <span class="ruby-identifier">test_suite</span>.<span class="ruby-identifier">start_time</span>)
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;elapsed&quot;</span>, <span class="ruby-identifier">test_suite</span>.<span class="ruby-identifier">elapsed_time</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-result_fault" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">result_fault</span><span
                                class="method-args">(fault)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="result_fault-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 65</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">result_fault</span>(<span class="ruby-identifier">fault</span>)
  <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;test-result&quot;</span>) <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;result&quot;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">output_test_suite</span>(<span class="ruby-ivar">@current_test_suite</span>)
      <span class="ruby-identifier">output_test</span>(<span class="ruby-ivar">@current_test</span>)
      <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;backtrace&quot;</span>) <span class="ruby-keyword">do</span>
        <span class="ruby-identifier">fault</span>.<span class="ruby-identifier">location</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">entry</span><span class="ruby-operator">|</span>
          <span class="ruby-identifier">file</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">info</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">split</span>(<span class="ruby-regexp">/:/</span>, <span class="ruby-value">3</span>)
          <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;entry&quot;</span>) <span class="ruby-keyword">do</span>
            <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;file&quot;</span>, <span class="ruby-identifier">file</span>)
            <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;line&quot;</span>, <span class="ruby-identifier">line</span>)
            <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;info&quot;</span>, <span class="ruby-identifier">info</span>)
          <span class="ruby-keyword">end</span>
        <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">fault</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:expected</span>)
        <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;expected&quot;</span>, <span class="ruby-identifier">fault</span>.<span class="ruby-identifier">expected</span>)
      <span class="ruby-keyword">end</span>
      <span class="ruby-keyword">if</span> <span class="ruby-identifier">fault</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:actual</span>)
        <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;actual&quot;</span>, <span class="ruby-identifier">fault</span>.<span class="ruby-identifier">actual</span>)
      <span class="ruby-keyword">end</span>
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;detail&quot;</span>, <span class="ruby-identifier">fault</span>.<span class="ruby-identifier">message</span>)
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;status&quot;</span>, <span class="ruby-identifier">fault</span>.<span class="ruby-identifier">label</span>.<span class="ruby-identifier">downcase</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-ivar">@already_outputted</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">fault</span>.<span class="ruby-identifier">critical?</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-result_pass_assertion" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">result_pass_assertion</span><span
                                class="method-args">(result)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="result_pass_assertion-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 59</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">result_pass_assertion</span>(<span class="ruby-identifier">result</span>)
  <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;pass-assertion&quot;</span>) <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">output_test</span>(<span class="ruby-ivar">@current_test</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-started" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">started</span><span
                                class="method-args">(result)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="started-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 93</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">started</span>(<span class="ruby-identifier">result</span>)
  <span class="ruby-ivar">@result</span> = <span class="ruby-identifier">result</span>
  <span class="ruby-identifier">output_started</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-test_finished" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">test_finished</span><span
                                class="method-args">(test)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="test_finished-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 115</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">test_finished</span>(<span class="ruby-identifier">test</span>)
  <span class="ruby-keyword">unless</span> <span class="ruby-ivar">@already_outputted</span>
    <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;test-result&quot;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">output_test</span>(<span class="ruby-identifier">test</span>)
      <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;result&quot;</span>) <span class="ruby-keyword">do</span>
        <span class="ruby-identifier">output_test_suite</span>(<span class="ruby-ivar">@current_test_suite</span>)
        <span class="ruby-identifier">output_test</span>(<span class="ruby-identifier">test</span>)
        <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;status&quot;</span>, <span class="ruby-string">&quot;success&quot;</span>)
      <span class="ruby-keyword">end</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;complete-test&quot;</span>) <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">output_test</span>(<span class="ruby-identifier">test</span>)
    <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;success&quot;</span>, <span class="ruby-identifier">test</span>.<span class="ruby-identifier">passed?</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-ivar">@current_test</span> = <span class="ruby-keyword">nil</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-test_started" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">test_started</span><span
                                class="method-args">(test)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="test_started-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 107</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">test_started</span>(<span class="ruby-identifier">test</span>)
  <span class="ruby-ivar">@already_outputted</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-ivar">@current_test</span> = <span class="ruby-identifier">test</span>
  <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;start-test&quot;</span>) <span class="ruby-keyword">do</span>
    <span class="ruby-identifier">output_test</span>(<span class="ruby-identifier">test</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-test_suite_finished" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">test_suite_finished</span><span
                                class="method-args">(suite)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="test_suite_finished-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 154</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">test_suite_finished</span>(<span class="ruby-identifier">suite</span>)
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">suite</span>.<span class="ruby-identifier">test_case</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;complete-test-suite&quot;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">output_test_suite</span>(<span class="ruby-identifier">suite</span>)
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;success&quot;</span>, <span class="ruby-identifier">suite</span>.<span class="ruby-identifier">passed?</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;complete-test-case&quot;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">output_test_suite</span>(<span class="ruby-identifier">suite</span>)
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;success&quot;</span>, <span class="ruby-identifier">suite</span>.<span class="ruby-identifier">passed?</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-ivar">@current_test_suite</span> = <span class="ruby-keyword">nil</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                  <div id="method-i-test_suite_started" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">test_suite_started</span><span
                                class="method-args">(suite)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="test_suite_started-source">
            <pre><span class="ruby-comment"># File test-unit-3.6.1/lib/test/unit/ui/xml/testrunner.rb, line 134</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">test_suite_started</span>(<span class="ruby-identifier">suite</span>)
  <span class="ruby-ivar">@current_test_suite</span> = <span class="ruby-identifier">suite</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">suite</span>.<span class="ruby-identifier">test_case</span>.<span class="ruby-identifier">nil?</span>
    <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;ready-test-suite&quot;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;n-tests&quot;</span>, <span class="ruby-identifier">suite</span>.<span class="ruby-identifier">size</span>)
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;start-test-suite&quot;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">output_test_suite</span>(<span class="ruby-identifier">suite</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;ready-test-case&quot;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">output_test_suite</span>(<span class="ruby-identifier">suite</span>)
      <span class="ruby-identifier">add_content</span>(<span class="ruby-string">&quot;n-tests&quot;</span>, <span class="ruby-identifier">suite</span>.<span class="ruby-identifier">size</span>)
    <span class="ruby-keyword">end</span>
    <span class="ruby-identifier">open_tag</span>(<span class="ruby-string">&quot;start-test-case&quot;</span>) <span class="ruby-keyword">do</span>
      <span class="ruby-identifier">output_test_suite</span>(<span class="ruby-identifier">suite</span>)
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is a service of <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>, purveyors of fine <a href='https://jamesbritt.bandcamp.com/'>dance noise</a></p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

